/*
 * File:   DynamicDataHeading.h
 * Author: jeffrey
 *
 * Created on June 21, 2010, 1:45 AM
 */

#ifndef _DYNAMICDATAHeading_H
#define	_DYNAMICDATAHeading_H
#include <string>

using namespace std;

class DynamicDataHeading {
public:
    DynamicDataHeading();
    DynamicDataHeading(const DynamicDataHeading& orig);
    virtual ~DynamicDataHeading();

    string getAttribName() const {
        return attribute_name;
    }

    void setAttribName(string attribute_name) {
        this->attribute_name = attribute_name;
    }

    string getSourceA() const {
        return source_attrib;
    }

    void setSourceA(string source_attrib) {
        this->source_attrib = source_attrib;
    }

    string getSourceT() const {
        return source_tbl;
    }

    void setSourceT(string source_tbl) {
        this->source_tbl = source_tbl;
    }

    int getComponent() const {
        return component;
    }

    void setComponent(int component) {
        this->component = component;
    }

    friend ostream & operator<<(ostream&, const DynamicDataHeading&);
    void print();
private:

    string attribute_name;
    int component;
    string source_tbl;
    string source_attrib;

};

DynamicDataHeading::DynamicDataHeading() {
}

DynamicDataHeading::DynamicDataHeading(const DynamicDataHeading& orig) {
    attribute_name = orig.attribute_name;
    component = orig.component;
    source_tbl = orig.source_tbl;
    source_attrib = orig.source_attrib;
}

DynamicDataHeading::~DynamicDataHeading() {
}

ostream & operator<<(ostream& output, const DynamicDataHeading& data) {
    return output << "component: " << data.getComponent() << "\n"
            << "attribute_name: " << data.getAttribName() << "\n"
            << "source_table: " << data.getSourceT() << "\n"
            << "source_attribute: " << data.getSourceA() << "\n";
}

void DynamicDataHeading::print() {
    cout << "component: " << this->getComponent() << "\n"
            << "attribute_name: " << this->getAttribName() << "\n"
            << "source_table: " << this->getSourceT() << "\n"
            << "source_attribute: " << this->getSourceA() << "\n";

}
#endif	/* _DYNAMICDATAHeading_H */